package homelesspartners.client;

import homelesspartners.client.model.Shelter;
import homelesspartners.client.model.Story;
import homelesspartners.client.model.ThankYou;
import homelesspartners.client.model.User;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.RemoteService;

public interface Service extends RemoteService {

	/**
	 * @gwt.typeArgs <homelesspartners.client.model.City>
	 */
	public ArrayList getCities();

	/**
	 * @gwt.typeArgs <homelesspartners.client.model.Shelter>
	 */
	public ArrayList getShelters(int cityId);

	/**
	 * @gwt.typeArgs <homelesspartners.client.model.Story>
	 */
	public ArrayList getStories(int shelterId, String idQuery, String nameQuery);

	public boolean pledgeGift(int giftIdId) throws ServerException;

	public User login(String userId, String password);

	public User createNewUser(String userId, String password);

	/**
	 * @gwt.typeArgs <homelesspartners.client.model.Gift>
	 */
	public ArrayList getShoppingList();

	public Story addInterview(Story story) throws ServerException;

	/**
	 * @gwt.typeArgs <homelesspartners.client.model.Story>
	 */
	public ArrayList addInterviewCheckFirst(Story story) throws ServerException;
	
	public Boolean unpledgeGift(int giftId) throws ServerException;

	public Boolean deleteStory(int storyId) throws ServerException;

	public Story updateStory(Story updatedStory) throws ServerException;

	public Boolean updateVolunteer(User volunteer) throws ServerException;

	public Boolean createNewVolunteer(User volunteer) throws ServerException;

	public Shelter addShelter(Shelter shelter) throws ServerException;

	public Shelter updateShelter(Shelter shelter) throws ServerException;

	public Boolean deleteShelter(int shelterId) throws ServerException;

	public ArrayList getPageOfStories(int id, int offset);

	public void sendPassword(String email);
	
	public Boolean updatePassword(String password) throws ServerException;
		
	/**
	 * @gwt.typeArgs <homelesspartners.client.model.ThankYou>
	 */
	public ArrayList getPageOfThankYous(int pageNumber) throws ServerException;
	
	public Boolean addThankYou(ThankYou thankyou) throws ServerException;
	
	public Boolean updateThankYou(ThankYou thankyou) throws ServerException;
	
	public Boolean deleteThankYou(int id) throws ServerException;
	
	/**
	 * @throws ServerException 
	 * @gwt.typeArgs <homelesspartners.client.model.ThankYou>
	 */
	public ArrayList getThankYous(String headerQuery) throws ServerException;
	
	/**
	 * @gwt.typeArgs <java.lang.String>
	 */
	public ArrayList getThankYouStats();
}
